<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
class PHPExcel_RichText implements PHPExcel_IComparable
{
    private $richTextElements;
    public function __construct(PHPExcel_Cell $pCell = NULL)
    {
        $this->richTextElements = [];
        if($pCell !== NULL) {
            if($pCell->getValue() != "") {
                $objRun = new PHPExcel_RichText_Run($pCell->getValue());
                $objRun->setFont(clone $pCell->getParent()->getStyle($pCell->getCoordinate())->getFont());
                $this->addText($objRun);
            }
            $pCell->setValueExplicit($this, PHPExcel_Cell_DataType::TYPE_STRING);
        }
    }
    public function addText(PHPExcel_RichText_ITextElement $pText = NULL)
    {
        $this->richTextElements[] = $pText;
        return $this;
    }
    public function createText($pText = "")
    {
        $objText = new PHPExcel_RichText_TextElement($pText);
        $this->addText($objText);
        return $objText;
    }
    public function createTextRun($pText = "")
    {
        $objText = new PHPExcel_RichText_Run($pText);
        $this->addText($objText);
        return $objText;
    }
    public function getPlainText()
    {
        $returnValue = "";
        foreach ($this->richTextElements as $text) {
            $returnValue .= $text->getText();
        }
        return $returnValue;
    }
    public function __toString()
    {
        return $this->getPlainText();
    }
    public function getRichTextElements()
    {
        return $this->richTextElements;
    }
    public function setRichTextElements($pElements = NULL)
    {
        if(is_array($pElements)) {
            $this->richTextElements = $pElements;
            return $this;
        }
        throw new PHPExcel_Exception("Invalid PHPExcel_RichText_ITextElement[] array passed.");
    }
    public function getHashCode()
    {
        $hashElements = "";
        foreach ($this->richTextElements as $element) {
            $hashElements .= $element->getHashCode();
        }
        return md5($hashElements . "PHPExcel_RichText");
    }
    public function __clone()
    {
        $vars = get_object_vars($this);
        foreach ($vars as $key => $value) {
            if(is_object($value)) {
                $this->{$key} = clone $value;
            } else {
                $this->{$key} = $value;
            }
        }
    }
}

?>